﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Manage_Service_delKnow : System.Web.UI.Page {

    int id = 0;

    protected void Page_Load(object sender, EventArgs e) {
        string result = "0";
        if (Request.QueryString["id"] == null) {
            ResponseWrite(result);
        }
        if (!int.TryParse(Request.QueryString["id"], out id)) {
            ResponseWrite(result);
        }
        else {
            if (!IsPostBack) {
                if (new Exam.Core.DAL.Knowledge().Del(id)) {
                    result = "1";
                }
                ResponseWrite(result);
            }
        }
    }

    private void ResponseWrite(string result) {
        Response.Write(result);
        Response.End();
    }
}
